package cn.ch.org.domain;

import cn.ch.basic.domain.Base;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data // 编译的时候帮你生成（可以不用写getter和setter 等等）
public class Department extends Base {
    //快速格式化 ctrl +alt +l
    //部门编号
    private String sn;
    private String name;
    //部门上级层级目录
    @ApiModelProperty("部门上级层级目录")
    private String dirPath;
    private Integer state;

    private Long manager_id;//部门管理员

    private Employee manager;

    private Long parent_id;

    private Department parent;
    //当前部门对应的儿子   能做到无限极
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();

}
